mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 18:18:35 +05:00
Fixed visualization bugs in the sketcher:
- created object were violet) - preferences values were not used for preview linewidth and edge and wire colors
This commit is contained in:
parent
aa7f259f2c
commit
db7d2b88d3
@ -58,6 +58,7 @@
|
|||||||
#include <Sketcher_Profile.hxx>
|
#include <Sketcher_Profile.hxx>
|
||||||
|
|
||||||
#include <SalomeApp_Study.h>
|
#include <SalomeApp_Study.h>
|
||||||
|
#include <SalomeApp_Tools.h>
|
||||||
|
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
|
|
||||||
@ -2260,11 +2261,17 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
|||||||
const int displayMode,
|
const int displayMode,
|
||||||
const int color )
|
const int color )
|
||||||
{
|
{
|
||||||
// Set color for preview shape
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
getDisplayer()->SetColor( Quantity_NOC_RED );
|
|
||||||
|
QColor aColor = resMgr->colorValue("Geometry","line_color",QColor(255,0,0));
|
||||||
|
Quantity_NameOfColor line_color = SalomeApp_Tools::color( aColor ).Name();
|
||||||
|
|
||||||
// set width of displayed shape
|
// set width of displayed shape
|
||||||
getDisplayer()->SetWidth( (lineWidth == -1)?myLineWidth:lineWidth );
|
int lw = lineWidth;
|
||||||
|
if(lw == -1) {
|
||||||
|
lw = resMgr->integerValue("Geometry", "preview_edge_width", -1);
|
||||||
|
}
|
||||||
|
getDisplayer()->SetWidth( lw );
|
||||||
|
|
||||||
// Disable activation of selection
|
// Disable activation of selection
|
||||||
getDisplayer()->SetToActivate( activate );
|
getDisplayer()->SetToActivate( activate );
|
||||||
@ -2279,6 +2286,7 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Build prs
|
// Build prs
|
||||||
|
getDisplayer()->SetColor( line_color );
|
||||||
SALOME_Prs* aPrs = getDisplayer()->BuildPrs( anApplyedWire );
|
SALOME_Prs* aPrs = getDisplayer()->BuildPrs( anApplyedWire );
|
||||||
if ( aPrs != 0 && !aPrs->IsNull() )
|
if ( aPrs != 0 && !aPrs->IsNull() )
|
||||||
GEOMBase_Helper::displayPreview( aPrs, append, update );
|
GEOMBase_Helper::displayPreview( aPrs, append, update );
|
||||||
@ -2288,6 +2296,8 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
|||||||
if ( aPrs != 0 && !aPrs->IsNull() )
|
if ( aPrs != 0 && !aPrs->IsNull() )
|
||||||
GEOMBase_Helper::displayPreview( aPrs, append, update );
|
GEOMBase_Helper::displayPreview( aPrs, append, update );
|
||||||
|
|
||||||
|
getDisplayer()->SetColor( line_color );
|
||||||
|
|
||||||
getDisplayer()->UnsetName();
|
getDisplayer()->UnsetName();
|
||||||
|
|
||||||
// Enable activation of displayed objects
|
// Enable activation of displayed objects
|
||||||
|
@ -68,7 +68,7 @@ class EntityGUI_SketcherDlg : public QDialog, GEOMBase_Helper
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0,
|
EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0,
|
||||||
const double = 2. );
|
const double = -1 );
|
||||||
~EntityGUI_SketcherDlg();
|
~EntityGUI_SketcherDlg();
|
||||||
|
|
||||||
bool eventFilter (QObject* object, QEvent* event);
|
bool eventFilter (QObject* object, QEvent* event);
|
||||||
|
Loading…
Reference in New Issue
Block a user