Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
疯人忠
Cvat
提交
0dbe0a57
C
Cvat
项目概览
疯人忠
/
Cvat
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Cvat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0dbe0a57
编写于
7月 16, 2021
作者:
B
Boris Sekachev
提交者:
GitHub
7月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed: Context image disappears after undo/redo (#3416)
* Fixed found issue * Updated version & changelog
上级
719fcf30
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
7 deletion
+19
-7
CHANGELOG.md
CHANGELOG.md
+1
-0
cvat-ui/src/actions/annotation-actions.ts
cvat-ui/src/actions/annotation-actions.ts
+12
-3
cvat-ui/src/components/annotation-page/standard-workspace/context-image/context-image.tsx
...n-page/standard-workspace/context-image/context-image.tsx
+5
-3
cvat-ui/src/reducers/annotation-reducer.ts
cvat-ui/src/reducers/annotation-reducer.ts
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
0dbe0a57
...
...
@@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-
Falsely successful
`cvat_ui`
image build in case of OOM error that leads to the default nginx welcome page
(
<https://github.com/openvinotoolkit/cvat/pull/3379>
)
-
Fixed issue when save filtered object in AAM (
<https://github.com/openvinotoolkit/cvat/pull/3401>
)
-
Context image disappears after undo/redo (
<https://github.com/openvinotoolkit/cvat/pull/3416>
)
### Security
...
...
cvat-ui/src/actions/annotation-actions.ts
浏览文件 @
0dbe0a57
...
...
@@ -801,7 +801,6 @@ export function undoActionAsync(sessionInstance: any, frame: number): ThunkActio
true
,
);
dispatch
(
changeFrameAsync
(
undo
[
1
]));
await
sessionInstance
.
actions
.
undo
();
const
history
=
await
sessionInstance
.
actions
.
get
();
const
states
=
await
sessionInstance
.
annotations
.
get
(
frame
,
showAllInterpolationTracks
,
filters
);
...
...
@@ -817,6 +816,11 @@ export function undoActionAsync(sessionInstance: any, frame: number): ThunkActio
maxZ
,
},
});
const
undoOnFrame
=
undo
[
1
];
if
(
frame
!==
undoOnFrame
)
{
dispatch
(
changeFrameAsync
(
undoOnFrame
));
}
}
catch
(
error
)
{
dispatch
({
type
:
AnnotationActionTypes
.
UNDO_ACTION_FAILED
,
...
...
@@ -845,7 +849,7 @@ export function redoActionAsync(sessionInstance: any, frame: number): ThunkActio
},
true
,
);
dispatch
(
changeFrameAsync
(
redo
[
1
]));
await
sessionInstance
.
actions
.
redo
();
const
history
=
await
sessionInstance
.
actions
.
get
();
const
states
=
await
sessionInstance
.
annotations
.
get
(
frame
,
showAllInterpolationTracks
,
filters
);
...
...
@@ -861,6 +865,11 @@ export function redoActionAsync(sessionInstance: any, frame: number): ThunkActio
maxZ
,
},
});
const
redoOnFrame
=
redo
[
1
];
if
(
frame
!==
redoOnFrame
)
{
dispatch
(
changeFrameAsync
(
redoOnFrame
));
}
}
catch
(
error
)
{
dispatch
({
type
:
AnnotationActionTypes
.
REDO_ACTION_FAILED
,
...
...
@@ -1632,7 +1641,7 @@ export function hideShowContextImage(hidden: boolean): AnyAction {
};
}
export
function
getContextImage
():
ThunkAction
{
export
function
getContextImage
Async
():
ThunkAction
{
return
async
(
dispatch
:
ActionCreator
<
Dispatch
>
):
Promise
<
void
>
=>
{
const
state
:
CombinedState
=
getStore
().
getState
();
const
{
instance
:
job
}
=
state
.
annotation
.
job
;
...
...
cvat-ui/src/components/annotation-page/standard-workspace/context-image/context-image.tsx
浏览文件 @
0dbe0a57
...
...
@@ -10,7 +10,7 @@ import Spin from 'antd/lib/spin';
import
Image
from
'
antd/lib/image
'
;
import
{
CombinedState
}
from
'
reducers/interfaces
'
;
import
{
hideShowContextImage
,
getContextImage
}
from
'
actions/annotation-actions
'
;
import
{
hideShowContextImage
,
getContextImage
Async
}
from
'
actions/annotation-actions
'
;
import
CVATTooltip
from
'
components/common/cvat-tooltip
'
;
export
function
adjustContextImagePosition
(
sidebarCollapsed
:
boolean
):
void
{
...
...
@@ -26,7 +26,7 @@ export function adjustContextImagePosition(sidebarCollapsed: boolean): void {
}
}
export
default
function
ContextImage
():
JSX
.
Element
|
null
{
function
ContextImage
():
JSX
.
Element
|
null
{
const
dispatch
=
useDispatch
();
const
{
number
:
frame
,
hasRelatedContext
}
=
useSelector
((
state
:
CombinedState
)
=>
state
.
annotation
.
player
.
frame
);
const
{
data
:
contextImageData
,
hidden
:
contextImageHidden
,
fetching
:
contextImageFetching
}
=
useSelector
(
...
...
@@ -42,7 +42,7 @@ export default function ContextImage(): JSX.Element | null {
useEffect
(()
=>
{
if
(
hasRelatedContext
&&
!
contextImageHidden
&&
!
requested
)
{
dispatch
(
getContextImage
());
dispatch
(
getContextImage
Async
());
setRequested
(
true
);
}
},
[
contextImageHidden
,
requested
,
hasRelatedContext
]);
...
...
@@ -85,3 +85,5 @@ export default function ContextImage(): JSX.Element | null {
</
div
>
);
}
export
default
React
.
memo
(
ContextImage
);
cvat-ui/src/reducers/annotation-reducer.ts
浏览文件 @
0dbe0a57
...
...
@@ -287,7 +287,7 @@ export default (state = defaultState, action: AnyAction): AnnotationState => {
},
contextImage
:
{
...
state
.
player
.
contextImage
,
data
:
null
,
...(
state
.
player
.
frame
.
number
===
number
?
{}
:
{
data
:
null
})
,
},
},
annotations
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录