MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / onItemRightClicked

Method onItemRightClicked

Gui/ProgressPanel.cpp:630–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void
631ProgressPanel::onItemRightClicked(TableItem* item)
632{
633 ProgressTaskInfoPtr task;
634 {
635 QMutexLocker k(&_imp->tasksMutex);
636 task = _imp->findTask(item);
637 }
638
639 if (!task) {
640 return;
641 }
642 ProcessHandlerPtr hasProcess = task->getProcess();
643 Menu m(this);
644 QAction* showLogAction = 0;
645 if (hasProcess) {
646 showLogAction = new QAction(tr("Show Process Log"), &m);
647 m.addAction(showLogAction);
648 }
649
650 QAction* triggered = 0;
651 if ( !m.isEmpty() ) {
652 triggered = m.exec( QCursor::pos() );
653 }
654 if ( (triggered == showLogAction) && showLogAction ) {
655 const QString& log = hasProcess->getProcessLog();
656 LogWindowModal window(log,this);
657 window.setWindowTitle( tr("Background Render Log") );
658 ignore_result(window.exec());
659 }
660}
661
662NATRON_NAMESPACE_EXIT
663

Callers

nothing calls this directly

Calls 6

ignore_resultFunction · 0.85
findTaskMethod · 0.80
getProcessMethod · 0.80
addActionMethod · 0.80
isEmptyMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected