@@ -728,7 +728,7 @@ bool PluginSystem::isCurrentDocEditing(const QObject *sender) {
728728 return false ;
729729 }
730730
731- return pluginCurrentEditor (plg);
731+ return pluginCurrentEditor (plg) != nullptr ;
732732}
733733
734734QString PluginSystem::currentDocFile (const QObject *sender) {
@@ -760,8 +760,7 @@ bool PluginSystem::isReadOnly(const QObject *sender) {
760760
761761 auto e = pluginCurrentEditor (plg);
762762 if (e) {
763- return e->hexEditor ()->cursor ()->insertionMode () ==
764- QHexCursor::InsertMode;
763+ return e->hexEditor ()->isReadOnly ();
765764 }
766765 return false ;
767766}
@@ -778,7 +777,8 @@ bool PluginSystem::isInsertionMode(const QObject *sender) {
778777
779778 auto e = pluginCurrentEditor (plg);
780779 if (e) {
781- return e->hexEditor ()->isLocked ();
780+ return e->hexEditor ()->cursor ()->insertionMode () ==
781+ QHexCursor::InsertMode;
782782 }
783783 return false ;
784784}
@@ -812,7 +812,7 @@ bool PluginSystem::isLocked(const QObject *sender) {
812812
813813 auto e = pluginCurrentEditor (plg);
814814 if (e) {
815- return e->hexEditor ()->document ()-> isDocSaved ();
815+ return e->hexEditor ()->isLocked ();
816816 }
817817 return false ;
818818}
@@ -1022,7 +1022,7 @@ bool PluginSystem::addressVisible(const QObject *sender) {
10221022
10231023 auto e = pluginCurrentEditor (plg);
10241024 if (e) {
1025- return e->hexEditor ()->headerVisible ();
1025+ return e->hexEditor ()->addressVisible ();
10261026 }
10271027 return false ;
10281028}
@@ -1039,7 +1039,7 @@ bool PluginSystem::headerVisible(const QObject *sender) {
10391039
10401040 auto e = pluginCurrentEditor (plg);
10411041 if (e) {
1042- return e->hexEditor ()->addressVisible ();
1042+ return e->hexEditor ()->headerVisible ();
10431043 }
10441044 return false ;
10451045}
0 commit comments