Merge pull request #21659 from 3x380V/gui_fixes

Gui: random fixes
This commit is contained in:
Chris Hennes
2025-06-03 19:23:21 -05:00
committed by GitHub
50 changed files with 477 additions and 396 deletions

View File

@@ -29,7 +29,7 @@
#include <App/Document.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include "ViewProvider.h"
@@ -50,7 +50,7 @@ bool ViewProviderPart::doubleClicked()
try {
QString text = QObject::tr("Edit %1").arg(QString::fromUtf8(getObject()->Label.getValue()));
Gui::Command::openCommand(text.toUtf8());
FCMD_SET_EDIT(pcObject);
Gui::cmdSetEdit(pcObject);
return true;
}
catch (const Base::Exception& e) {

View File

@@ -34,7 +34,7 @@
#include <App/Document.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Gui/Control.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
@@ -63,7 +63,7 @@ bool ViewProvider::doubleClicked()
try {
QString text = QObject::tr("Edit %1").arg(QString::fromUtf8(getObject()->Label.getValue()));
Gui::Command::openCommand(text.toUtf8());
FCMD_SET_EDIT(pcObject);
Gui::cmdSetEdit(pcObject);
}
catch (const Base::Exception&) {
Gui::Command::abortCommand();

View File

@@ -24,7 +24,7 @@
#include "PreCompiled.h"
#include <App/Document.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Mod/PartDesign/App/FeatureBase.h>
#include "ViewProviderBase.h"
@@ -54,7 +54,7 @@ bool ViewProviderBase::doubleClicked()
std::string Msg("Edit ");
Msg += base->Label.getValue();
Gui::Command::openCommand(Msg.c_str());
FCMD_SET_EDIT(base);
Gui::cmdSetEdit(base);
}
catch (const Base::Exception&) {
Gui::Command::abortCommand();

View File

@@ -340,7 +340,7 @@ void CmdTechDrawToggleFrame::activated(int iMsg)
Gui::Action *action = this->getAction();
if (action) {
action->setChecked(!vpPage->getFrameState(), true);
action->setBlockedChecked(!vpPage->getFrameState());
}
}
@@ -358,7 +358,7 @@ bool CmdTechDrawToggleFrame::isActive()
Gui::Action* action = this->getAction();
if (action) {
action->setChecked(vpp && !vpp->getFrameState(), true);
action->setBlockedChecked(vpp && !vpp->getFrameState());
}
return true;